import * as types from "../../mutation-type";

export const userInfo = {
    name: 'miss li',
    age: 10
}

const loginInfo = (state = userInfo , action) =>{
    let {type, data} = action;

    switch (type) {
        case types.ADD_NUM:
            return {...state, num: data.num}
        case types.SUB_NUM:
            return {...state, num: data.num}
        default:
            return state;
    }
}

export default loginInfo;